
#ifndef MATEHANDLER_H
#define MATEHANDLER_H

#include <BSpace>
#include <BHandler>

using namespace BWE;

class MateHandler : public BHandler
{
public:
	MateHandler();
	~MateHandler();

	void focus(const BObject* object = 0);
	void focus(const BSpace& space);

	void setMoveStep(BReal moveStep);
	BReal moveStep() const;

	void setRotateStep(BReal rotateStep);
	BReal rotateStep() const;

protected:
	virtual void paint(BPainter& painter);
	virtual void render(BRender& render);

	virtual bool keyDownEvent(const BKeyEvent& keyEvent);
	virtual bool keyUpEvent(const BKeyEvent& keyEvent);

	virtual bool mouseEnterEvent(const BMouseEvent& mouseEvent);
	virtual bool mouseLeaveEvent(const BMouseEvent& mouseEvent);
	virtual bool mousePressEvent(const BMouseEvent& mouseEvent);
	virtual bool mouseReleaseEvent(const BMouseEvent& mouseEvent);
	virtual bool mouseMoveEvent(const BMouseEvent& mouseEvent);
	virtual bool mouseWheelEvent(const BMouseEvent& mouseEvent);

private:
	BReal		_rotateStep;
	BReal		_moveStep;

	bool		_rightPressed;
	BPoint		_rightPressedPos;
	BVector		_rightPressedDirect;

};


#endif